package com.weixingtu.commuterCar.service.impl;

import com.weixingtu.commuterCar.bean.Device;
import com.weixingtu.commuterCar.dao.DeviceDao;
import com.weixingtu.commuterCar.dao.impl.DeviceDaoImpl;
import com.weixingtu.commuterCar.service.DeviceService;

import java.util.List;

public class DeviceServiceImpl implements DeviceService {
    private static DeviceDao dao = new DeviceDaoImpl();
    @Override
    public void insert(Device device) {
        dao.insert(device);
    }

    @Override
    public void update(Device device) {
        dao.update(device);
    }

    @Override
    public void delete(String imei) {
        dao.delete(imei);
    }

    @Override
    public int queryByImei(String imei) {
        int lineId = dao.queryByImei(imei);
        return lineId;
    }

    @Override
    public List<Device> queryAll(){
        return dao.queryAll();
    }
}
